Music Object Extension - Wizards
|
|
This extension adds methods that let you easily sonify all form elements and links on a page in a single step, without having to add JavaScript code to all the elements you wish to sonify.
|
What's New in the Latest Version
|
There is a dedicated version history for this extension, where you will be able to find out about the new features and possible issues with the most recent version. The version history for this extension is independent of the version history for the core Music Object API.
To get the "music-object-x-wizards.js" JavaScript file that implements this extension, simply right-click on this link (click-and-hold for Mac users). Then, from the menu that pops up, select the 'Save Link As...' or 'Save Target As...' option and save the file as "music-object-x-wizards.js" into an appropriate folder of the local copy of your Web site.
In case you have problems saving the file using the above link, the "music-object-x-wizards.js" file can also be found inside the documentation's "javascript" folder, along with the "music-object.js" file.
In order to use this extension, the following JavaScript file(s) must first be sourced in...
- music-object.js (version 3.3.0 or higher)
For more information on using extensions, consult the section About Music Object Extensions.
The Music.addLinkLabel static method lets you attach labels to links so that groups of links can be specified when using the Music.sonifyLinksWithGroovoids and Music.sonifyLinksWithHandlers static methods.
|
Music.addLinkLabel ( LinkLabelSTR ) |
A group of links is identified by specifying the labels of the start and end links in a series of links. Optionally, a label prefix can be used to identify only certain links from the group of links specified by the start and end link labels. A label can be added to a link by adding a call to the Music.addLinkLabel method to the link's ONCLICK, ONMOUSEOVER, or ONMOUSEOUT event handlers. Multiple labels can be added to the same link by adding multiple calls to the Music.addLinkLabel method to the link's event handlers.
In the example below, the link labels "start chunky links" and "end chunky links" can be used to identify the group of links containing the links "Link 05", "Link 06", "Link 07", "Link 08", "Link 09", "Link 10", and "Link 11".
<A HREF="link01.html">Link 01</A>
<A HREF="link02.html">Link 02</A>
<A HREF="link03.html">Link 03</A>
<A HREF="link04.html">Link 04</A>
<A HREF="link05.html" ONCLICK="Music.addLinkLabel ('start chunky links')">Link 05</A>
<A HREF="link06.html">Link 06</A>
<A HREF="link07.html">Link 07</A>
<A HREF="link08.html">Link 08</A>
<A HREF="link09.html">Link 09</A>
<A HREF="link10.html">Link 10</A>
<A HREF="link11.html" ONCLICK="Music.addLinkLabel ('end chunky links')">Link 11</A>
<A HREF="link12.html">Link 12</A>
<A HREF="link13.html">Link 13</A>
<A HREF="link14.html">Link 14</A>
|
Overlapping groups of links can also be specified using link labels. The link labels in the following example could be used to specify two overlapping link groups. The first group can be specified using the link labels "start mouseovers" and "end mouseovers", and would contain the links "Link 02", "Link 03", "Link 04", "Link 05", "Link 06", "Link 07", and "Link 08". The second group can be specified using the link labels "start clicks" and "end clicks", and would contain the links "Link 05", "Link 06", "Link 07", "Link 08", "Link 09", "Link 10", "Link 11", and "Link 12".
<A HREF="link01.html">Link 01</A>
<A HREF="link02.html" ONCLICK="Music.addLinkLabel ('start mouseovers')">Link 02</A>
<A HREF="link03.html">Link 03</A>
<A HREF="link04.html">Link 04</A>
<A HREF="link05.html" ONCLICK="Music.addLinkLabel ('start clicks')">Link 05</A>
<A HREF="link06.html">Link 06</A>
<A HREF="link07.html">Link 07</A>
<A HREF="link08.html" ONCLICK="Music.addLinkLabel ('end mouseovers')">Link 08</A>
<A HREF="link09.html">Link 09</A>
<A HREF="link10.html">Link 10</A>
<A HREF="link11.html">Link 11</A>
<A HREF="link12.html" ONCLICK="Music.addLinkLabel ('end clicks')">Link 12</A>
<A HREF="link13.html">Link 13</A>
<A HREF="link14.html">Link 14</A>
|
Now, if either the Music.sonifyLinksWithGroovoids or Music.sonifyLinksWithHandlers method was used to add a sonification behavior to the ONMOUSEOVER event of all the links in the group specified by the "start mouseovers" and "end mouseovers" labels, and if either the Music.sonifyLinksWithGroovoids or Music.sonifyLinksWithHandlers method was used to add a sonification behavior to the ONCLICK event of all the links in the group specified by the "start click" and "end click" labels, then the links from "Link 05" to "Link 08" would have sonification behaviors for both the ONMOUSEOVER and ONCLICK events, while the links from "Link 02" to "Link 04" would have a sonification behavior for just the ONMOUSEOVER event, and the links from "Link 09" to "Link 12" would have a sonification behavior for just the ONCLICK event. The remaining links - "Link 01", "Link 13", and "Link 14" - would have no sonification behaviors for any events.
In the next example, the link label prefix "chunky link" can be used to identify the group of links containing the links "Link 02", "Link 05", "Link 08", "Link 11", and "Link 13".
<A HREF="link01.html">Link 01</A>
<A HREF="link02.html" ONCLICK="Music.addLinkLabel ('chunky link')">Link 02</A>
<A HREF="link03.html">Link 03</A>
<A HREF="link04.html">Link 04</A>
<A HREF="link05.html" ONCLICK="Music.addLinkLabel ('chunky link')">Link 05</A>
<A HREF="link06.html">Link 06</A>
<A HREF="link07.html">Link 07</A>
<A HREF="link08.html" ONCLICK="Music.addLinkLabel ('chunky link')">Link 08</A>
<A HREF="link09.html">Link 09</A>
<A HREF="link10.html">Link 10</A>
<A HREF="link11.html" ONCLICK="Music.addLinkLabel ('chunky link')">Link 11</A>
<A HREF="link12.html">Link 12</A>
<A HREF="link13.html" ONCLICK="Music.addLinkLabel ('chunky link')">Link 13</A>
<A HREF="link14.html">Link 14</A>
|
The Music.sonifyFormsWithGroovoids static method lets you easily sonify all of the form elements on an HTML page using Groovoids.
|
Music.sonifyFormsWithGroovoids (
TargetMusicObjectOBJ ,
CheckboxCheckGroovoidNameSTR ,
CheckboxUncheckGroovoidNameSTR ,
RadioButtonClickGroovoidNameSTR ,
ListFocusGroovoidNameSTR ,
ListChooseGroovoidNameSTR ,
ListBlurGroovoidNameSTR ,
MultilistFocusGroovoidNameSTR ,
MultilistChooseGroovoidNameSTR ,
MultilistBlurGroovoidNameSTR ,
TextboxFocusGroovoidNameSTR ,
TextboxBlurGroovoidNameSTR ,
ButtonClickGroovoidNameSTR ,
FormResetGroovoidNameSTR ,
FormSubmitGroovoidNameSTR ,
UpdateTypeSTR ,
WindowHandleOBJ
)
|
The various parameters of this method (described in further detail below) let you choose which Groovoids are to play for the various form element events.

- TargetMusicObjectOBJ - specifies which Music Object instance is to be used to play the Groovoids for the various sonified form elements
- CheckboxCheckGroovoidNameSTR - lets you specify the Groovoid that is to play when a checkbox is checked by the user
- CheckboxUncheckGroovoidNameSTR - lets you specify the Groovoid that is to play when a checkbox is unchecked by the user
- RadioButtonClickGroovoidNameSTR - lets you specify the Groovoid that is to play when the user clicks on a radio button
- ListFocusGroovoidNameSTR - lets you specify the Groovoid that is to play when the user focuses a single selection listbox
- ListChooseGroovoidNameSTR - lets you specify the Groovoid that is to play when the user chooses an option from a single selection listbox
- ListBlurGroovoidNameSTR - lets you specify the Groovoid that is to play when a single selection listbox loses its focus
- MultilistFocusGroovoidNameSTR - lets you specify the Groovoid that is to play when the user focuses a multiple selection listbox
- MultilistChooseGroovoidNameSTR - lets you specify the Groovoid that is to play each time the user selects an option in a multiple selection listbox
- MultilistBlurGroovoidNameSTR - lets you specify the Groovoid that is to play when a multiple selection listbox loses its focus
- TextboxFocusGroovoidNameSTR - lets you specify the Groovoid that is to play when the user focuses a textbox and begins entering data
- TextboxBlurGroovoidNameSTR - lets you specify the Groovoid that is to play when a textbox loses its focus
- ButtonClickGroovoidNameSTR - lets you specify the Groovoid that is to play when any form button - other than a reset button or submit button - is clicked
- FormResetGroovoidNameSTR - lets you specify the Groovoid that is to play when a form's reset button is clicked
- FormSubmitGroovoidNameSTR - lets you specify the Groovoid that is to play when a form's submit button is clicked
- UpdateTypeSTR - lets you specify the way in which the new sonification scheme should affect any sonification scheme that is already set up for the form elements that will be sonified by this method. There are four possible values for this parameter...
- "add to" - means that the effect of this method will be cumulative, so that the sonification scheme specified by this method will be added to any existing sonification scheme.
- "replace" - means that the sonification scheme specified by this method will completely replace any sonification scheme already set up for the form elements. If there are events in the new sonification scheme that do not have any Groovoid specified, then the previous sonification behavior for these events of the form elements will be erased. It is possible to use this method to completely erase the sonification of form elements, simply by specifying empty strings for all the GroovoidNameSTR-type parameters, and by also specifying the "replace" value for the UpdateTypeSTR parameter.
- "merge with" - means that the sonification scheme specified by this method will replace the existing sonification scheme set up for form elements, but only for those events for which a Groovoid is specified. As an example, if this method were used with the value "merge with" specified for the UpdateTypeSTR parameter, and if there was a Groovoid specified for only the TextboxFocusGroovoidNameSTR parameter, then this method would overwrite the sonification behavior for the onFocus events of all the textboxes but would not overwrite the sonification behaviors for any of the other form element events. So, unlike the "replace" value, the "merge with" value will not allow you to use this method to completely erase the sonification scheme for form elements.
- "fill in" - means that the sonification scheme specified by this method will fill in the "holes" in the existing sonification scheme set up for form elements. For example, if this method were used with the value "fill in" specified for the UpdateTypeSTR parameter, and if there was a Groovoid specified for the TextboxFocusGroovoidNameSTR parameter, then this method will add the specified Groovoid to the onFocus events for all of the textboxes that don't already have a sonification behavior set up for the onFocus event.
- WindowHandleOBJ - lets you specify the window or frame that contains the form elements you would like to sonify. This allows you to use this method to sonify form elements that are in a different window or frame than the window or frame that contains the music and resources and sonification code. As an example, a window that is sonified and has sourced in the "music-object.js" and "music-object-x-wizards.js" files can spawn a new window and sonify the form elements in that window using the Music.sonifyFormsWithGroovoids method, simply by using the WindowHandleOBJ parameter to specify a reference to the spawned window that is to be sonified.

- When a value of null is specified for the UpdateTypeSTR parameter, then "add to" will be used as the default update type.

- Music.sonifyFormsWithGroovoids ( TargetMusicObjectOBJ , CheckboxCheckGroovoidNameSTR , CheckboxUncheckGroovoidNameSTR , RadioButtonClickGroovoidNameSTR , ListFocusGroovoidNameSTR , ListChooseGroovoidNameSTR , ListBlurGroovoidNameSTR , MultilistFocusGroovoidNameSTR , MultilistChooseGroovoidNameSTR , MultilistBlurGroovoidNameSTR , TextboxFocusGroovoidNameSTR , TextboxBlurGroovoidNameSTR , ButtonClickGroovoidNameSTR , FormResetGroovoidNameSTR , FormSubmitGroovoidNameSTR , UpdateTypeSTR )
When no WindowHandleOBJ parameter is specified, then the form elements inside the window in which this method is called will be sonified. This is the most common way in which form elements will be sonified using this method (ie. just the form elements inside the document in which the sonification code resides).
- Music.sonifyFormsWithGroovoids ( TargetMusicObjectOBJ , CheckboxCheckGroovoidNameSTR , CheckboxUncheckGroovoidNameSTR , RadioButtonClickGroovoidNameSTR , ListFocusGroovoidNameSTR , ListChooseGroovoidNameSTR , ListBlurGroovoidNameSTR , MultilistFocusGroovoidNameSTR , MultilistChooseGroovoidNameSTR , MultilistBlurGroovoidNameSTR , TextboxFocusGroovoidNameSTR , TextboxBlurGroovoidNameSTR , ButtonClickGroovoidNameSTR , FormResetGroovoidNameSTR , FormSubmitGroovoidNameSTR )
When there is also no UpdateTypeSTR parameter specified, then the string value "add to" will be used as the default for this parameter. In the most typical use of this method, it will not be necessary to specify the UpdateTypeSTR parameter.

- for examples using the Music.sonifyFormsWithGroovoids method, see the Sonifying a Form tutorial...
- it is safest to only use this method after a document has finished loading in
The Music.sonifyFormsWithHandlers static method lets you easily sonify all of the form elements on an HTML page using handlers.
|
Music.sonifyFormsWithHandlers (
CheckboxCheckJavaScriptSTR ,
CheckboxUncheckJavaScriptSTR ,
RadioButtonClickJavaScriptSTR ,
ListFocusJavaScriptSTR ,
ListChooseJavaScriptSTR ,
ListBlurJavaScriptSTR ,
MultilistFocusJavaScriptSTR ,
MultilistChooseJavaScriptSTR ,
MultilistBlurJavaScriptSTR ,
TextboxFocusJavaScriptSTR ,
TextboxBlurJavaScriptSTR ,
ButtonClickJavaScriptSTR ,
FormResetJavaScriptSTR ,
FormSubmitJavaScriptSTR ,
UpdateTypeSTR ,
WindowHandleOBJ
)
|
The various parameters of this method (described in further detail below) let you specify the JavaScript code that is to be executed for the various form element events.

- CheckboxCheckJavaScriptSTR - lets you specify the JavaScript code to be executed when a checkbox is checked by the user
- CheckboxUncheckJavaScriptSTR - lets you specify the JavaScript code to be executed when a checkbox is unchecked by the user
- RadioButtonClickJavaScriptSTR - lets you specify the JavaScript code to be executed when the user clicks on a radio button
- ListFocusJavaScriptSTR - lets you specify the JavaScript code to be executed when the user focuses a single selection listbox
- ListChooseJavaScriptSTR - lets you specify the JavaScript code to be executed when the user chooses an option from a single selection listbox
- ListBlurJavaScriptSTR - lets you specify the JavaScript code to be executed when a single selection listbox loses its focus
- MultilistFocusJavaScriptSTR - lets you specify the JavaScript code to be executed when the user focuses a multiple selection listbox
- MultilistChooseJavaScriptSTR - lets you specify the JavaScript code to be executed each time the user selects an option in a multiple selection listbox
- MultilistBlurJavaScriptSTR - lets you specify the JavaScript code to be executed when a multiple selection listbox loses its focus
- TextboxFocusJavaScriptSTR - lets you specify the JavaScript code to be executed when the user focuses a textbox and begins entering data
- TextboxBlurJavaScriptSTR - lets you specify the JavaScript code to be executed when a textbox loses its focus
- ButtonClickJavaScriptSTR - lets you specify the JavaScript code to be executed when any form button - other than a reset button or submit button - is clicked
- FormResetJavaScriptSTR - lets you specify the JavaScript code to be executed when a form's reset button is clicked
- FormSubmitJavaScriptSTR - lets you specify the JavaScript code to be executed when a form's submit button is clicked
- UpdateTypeSTR - lets you specify the way in which the new sonification scheme should affect any sonification scheme that is already set up for the form elements that will be sonified by this method. There are four possible values for this parameter...
- "add to" - means that the effect of this method will be cumulative, so that the sonification scheme specified by this method will be added to any existing sonification scheme.
- "replace" - means that the sonification scheme specified by this method will completely replace any sonification scheme already set up for the form elements. If there are events in the new sonification scheme that do not have any JavaScript code specified, then the previous sonification behavior for these events of the form elements will be erased. It is possible to use this method to completely erase the sonification of form elements, simply by specifying empty strings for all the JavaScriptSTR-type parameters, and by also specifying the "replace" value for the UpdateTypeSTR parameter.
- "merge with" - means that the sonification scheme specified by this method will replace the existing sonification scheme set up for form elements, but only for those events for which JavaScript code is specified. As an example, if this method were used with the value "merge with" specified for the UpdateTypeSTR parameter, and if there was JavaScript code specified for only the TextboxFocusJavaScriptSTR parameter, then this method would overwrite the sonification behavior for the onFocus events of all the textboxes but would not overwrite the sonification behaviors for any of the other form element events. So, unlike the "replace" value, the "merge with" value will not allow you to use this method to completely erase the sonification scheme for form elements.
- "fill in" - means that the sonification scheme specified by this method will fill in the "holes" in the existing sonification scheme set up for form elements. For example, if this method were used with the value "fill in" specified for the UpdateTypeSTR parameter, and if there was JavaScript code specified for the TextboxFocusJavaScriptSTR parameter, then this method will add the specified JavaScript code to the onFocus events for all of the textboxes that don't already have a sonification behavior set up for the onFocus event.
- WindowHandleOBJ - lets you specify the window or frame that contains the form elements you would like to sonify. This allows you to use this method to sonify form elements that are in a different window or frame than the window or frame that contains the music and resources and sonification code. As an example, a window that is sonified and has sourced in the "music-object.js" and "music-object-x-wizards.js" files can spawn a new window and sonify the form elements in that window using the Music.sonifyFormsWithGroovoids method, simply by using the WindowHandleOBJ parameter to specify a reference to the spawned window that is to be sonified.

- When a value of null is specified for the UpdateTypeSTR parameter, then "add to" will be used as the default update type.

- Music.sonifyFormsWithHandlers ( CheckboxCheckJavaScriptSTR , CheckboxUncheckJavaScriptSTR , RadioButtonClickJavaScriptSTR , ListFocusJavaScriptSTR , ListChooseJavaScriptSTR , ListBlurJavaScriptSTR , MultilistFocusJavaScriptSTR , MultilistChooseJavaScriptSTR , MultilistBlurJavaScriptSTR , TextboxFocusJavaScriptSTR , TextboxBlurJavaScriptSTR , ButtonClickJavaScriptSTR , FormResetJavaScriptSTR , FormSubmitJavaScriptSTR , UpdateTypeSTR )
When no WindowHandleOBJ parameter is specified, then the form elements inside the window in which this method is called will be sonified. This is the most common way in which form elements will be sonified using this method (ie. just the form elements inside the document in which the sonification code resides).
- Music.sonifyFormsWithHandlers ( CheckboxCheckJavaScriptSTR , CheckboxUncheckJavaScriptSTR , RadioButtonClickJavaScriptSTR , ListFocusJavaScriptSTR , ListChooseJavaScriptSTR , ListBlurJavaScriptSTR , MultilistFocusJavaScriptSTR , MultilistChooseJavaScriptSTR , MultilistBlurJavaScriptSTR , TextboxFocusJavaScriptSTR , TextboxBlurJavaScriptSTR , ButtonClickJavaScriptSTR , FormResetJavaScriptSTR , FormSubmitJavaScriptSTR )
When there is also no UpdateTypeSTR parameter specified, then the string value "add to" will be used as the default for this parameter. In the most typical use of this method, it will not be necessary to specify the UpdateTypeSTR parameter.

- for examples using the Music.sonifyFormsWithGroovoids method, see the Sonifying a Form tutorial...
- it is safest to only use this method after a document has finished loading in
The Music.sonifyLinksWithGroovoids static method lets you easily sonify all (or a subset) of the links on an HTML page using Groovoids.
|
Music.sonifyLinksWithGroovoids (
TargetMusicObjectOBJ ,
LinkClickGroovoidNameSTR ,
LinkOverGroovoidNameSTR ,
LinkOutGroovoidNameSTR ,
LinkHoverGroovoidNameSTR ,
LinkHoverDelayMsINT ,
StartLinkLabelSTR ,
EndLinkLabelSTR ,
LinkLabelPrefixSTR ,
UpdateTypeSTR ,
WindowHandleOBJ
)
|
The various parameters of this method (described in further detail below) let you choose which Groovoids are to play for the various link events, and also which links are to be sonified. Using the StartLinkLabelSTR, EndLinkLabelSTR, and LinkLabelPrefixSTR parameters, it is possible to identify exact groups of links that are to be sonified using this method. The method can be used several times to sonify different groups of links in different ways.

- TargetMusicObjectOBJ - specifies which Music Object instance is to be used to play the Groovoids for the various sonified link events
- LinkClickGroovoidNameSTR - lets you specify the Groovoid that is to play when a click event occurs for any of the sonified links
- LinkOverGroovoidNameSTR - lets you specify the Groovoid that is to play when an onMouseOver event occurs for any of the sonified links
- LinkOutGroovoidNameSTR - lets you specify the Groovoid that is to play when an onMouseOut event occurs for any of the sonified links
- LinkHoverGroovoidNameSTR - lets you specify the Groovoid that is to play when a "hover" event occurs for any of the sonified links
- LinkHoverDelayMsINT - lets you specify how long (measured in milliseconds) the user should remain over a link before a hover event is triggered for that link
- StartLinkLabelSTR - lets you specify the first link in the group of links that is to be sonified. For information on labeling links, see the Music.addLinkLabel method.
- EndLinkLabelSTR - lets you specify the last link in the group of links that is to be sonified. For information on labeling links, see the Music.addLinkLabel method.
- LinkLabelPrefixSTR - lets you specify a label prefix that is used to select only certain links out of the group of links specified by the StartLinkLabelSTR and EndLinkLabelSTR parameters. For information on labeling links, see the Music.addLinkLabel method.
- UpdateTypeSTR - lets you specify the way in which the new sonification scheme should affect any sonification scheme that is already set up for the links that will be sonified by this method. There are four possible values for this parameter...
- "add to" - means that the effect of this method will be cumulative, so that the sonification scheme specified by this method will be added to any existing sonification scheme.
- "replace" - means that the sonification scheme specified by this method will completely replace any sonification scheme already set up for the links. If there are events in the new sonification scheme that do not have any Groovoid specified, then the previous sonification behavior for these events of the links will be erased. It is possible to use this method to completely erase the sonification of a set of links, simply by specifying empty strings for all the GroovoidNameSTR-type parameters, and by also specifying the "replace" value for the UpdateTypeSTR parameter.
- "merge with" - means that the sonification scheme specified by this method will replace the existing sonification scheme set up for the links, but only for those events for which a Groovoid is specified. As an example, if this method were used with the value "merge with" specified for the UpdateTypeSTR parameter, and if there was a Groovoid specified for only the LinkOverGroovoidNameSTR parameter, then this method would overwrite the sonification behavior for the onMouseOver events of all the links but would not overwrite the sonification behaviors for any of the other link events. So, unlike the "replace" value, the "merge with" value will not allow you to use this method to completely erase the sonification scheme for a set of links.
- "fill in" - means that the sonification scheme specified by this method will fill in the "holes" in the existing sonification scheme set up for links. For example, if this method were used with the value "fill in" specified for the UpdateTypeSTR parameter, and if there was a Groovoid specified for the LinkOverGroovoidNameSTR parameter, then this method will add the specified Groovoid to the onMouseOver events for all of the links that don't already have a sonification behavior set up for the onMouseOver event.
- WindowHandleOBJ - lets you specify the window or frame that contains the links you would like to sonify. This allows you to use this method to sonify links that are in a different window or frame than the window or frame that contains the music and resources and sonification code. As an example, a window that is sonified and has sourced in the "music-object.js" and "music-object-x-wizards.js" files can spawn a new window and sonify the links in that window using the Music.sonifyLinksWithGroovoids method, simply by using the WindowHandleOBJ parameter to specify a reference to the spawned window that is to be sonified.
Sonification of links using this method is cumulative by default (unless you specify a value for the UpdateTypeSTR parameter), so you can use the method multiple times to add further sonification. In the following example, all the links inside a document are being sonified so that their click events play the Groovoid UI-Choice, whereas only the subset of links from the link labeled "start chunky links" to the link labeled "end chunky links" are sonified so that their onMouseOver and hover events also play Groovoids.
<HTML><HEAD><TITLE>Link Sonification Example</TITLE></HEAD>
<BODY ONLOAD="sonifyLinks ()">
<SCRIPT SRC="music-object.js></SCRIPT>
<SCRIPT SRC="music-object-x-wizards.js></SCRIPT>
<A HREF="link01.html">Link 01</A>
<A HREF="link02.html">Link 02</A>
<A HREF="link03.html">Link 03</A>
<A HREF="link04.html">Link 04</A>
<A HREF="link05.html" ONCLICK="Music.addLinkLabel ('start chunky links')">Link 05</A>
<A HREF="link06.html">Link 06</A>
<A HREF="link07.html">Link 07</A>
<A HREF="link08.html">Link 08</A>
<A HREF="link09.html">Link 09</A>
<A HREF="link10.html">Link 10</A>
<A HREF="link11.html" ONCLICK="Music.addLinkLabel ('end chunky links')">Link 11</A>
<A HREF="link12.html">Link 12</A>
<A HREF="link13.html">Link 13</A>
<A HREF="link14.html">Link 14</A>
<SCRIPT LANGUAGE=JavaScript><!-- //
groovoidPlayer = new Music ();
function sonifyLinks () {
Music.sonifyLinksWithGroovoids (
groovoidPlayer,
'UI-Choice1'
);
Music.sonifyLinksWithGroovoids (
groovoidPlayer,
'',
'UI-Click17',
'',
'UI-MouseOver2',
500,
'start chunky links',
'end chunky links'
);
}
groovoidPlayer.stubEmbed ('stub.rmf');
// --></SCRIPT>
</BODY></HTML>
|

- When a value of null is specified for the LinkHoverDelayMsINT parameter, then the value 350 will be used as the default.
- When a value of null, an empty string, or the string value "[first link]" is specified for the StartLinkLabelSTR parameter, then the first link in the document will be used as the start of the link group to be sonified.
- When a value of null, an empty string, or the string value "[last link]" is specified for the EndLinkLabelSTR parameter, then the last link in the document will be used as the end of the link group to be sonified.
- When a value of null or an empty string is specified for the LinkLabelPrefixSTR parameter, then all of the links in the group specified by the StartLinkLabelSTR and EndLinkLabelSTR parameters will be sonified.
- When a value of null is specified for the UpdateTypeSTR parameter, then "add to" will be used as the default update type.

- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR , LinkOverGroovoidNameSTR , LinkOutGroovoidNameSTR , LinkHoverGroovoidNameSTR , LinkHoverDelayMsINT , StartLinkLabelSTR , EndLinkLabelSTR , UpdateTypeSTR )
When no WindowHandleOBJ parameter is specified, then the links inside the window in which this method is called will be sonified. This is the most common way in which links will be sonified using this method (ie. just the links inside the document in which the sonification code resides).
- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR , LinkOverGroovoidNameSTR , LinkOutGroovoidNameSTR , LinkHoverGroovoidNameSTR , LinkHoverDelayMsINT , StartLinkLabelSTR , EndLinkLabelSTR )
When there is also no UpdateTypeSTR parameter specified, then the string value "add to" will be used as the default for this parameter. In the most typical use of this method, it will not be necessary to specify the UpdateTypeSTR parameter.
- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR , LinkOverGroovoidNameSTR , LinkOutGroovoidNameSTR , LinkHoverGroovoidNameSTR , LinkHoverDelayMsINT , StartLinkLabelSTR , EndLinkLabelSTR )
When there is also no LinkLabelPrefixSTR parameter specified, then all links in the group of links specified by the StartLinkLabelSTR and EndLinkLabelSTR parameters will be sonified.
- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR , LinkOverGroovoidNameSTR , LinkOutGroovoidNameSTR , LinkHoverGroovoidNameSTR , LinkHoverDelayMsINT , StartLinkLabelSTR )
When there is also no EndLinkLabelSTR parameter specified, then all links in the document starting from the link specified by the StartLinkLabelSTR parameter will be sonified.
- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR , LinkOverGroovoidNameSTR , LinkOutGroovoidNameSTR , LinkHoverGroovoidNameSTR , LinkHoverDelayMsINT )
When there is also no StartLinkLabelSTR parameter specified, then all links in the document will be sonified.
- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR , LinkOverGroovoidNameSTR , LinkOutGroovoidNameSTR , LinkHoverGroovoidNameSTR )
When there is also no LinkHoverDelayMsINT parameter specified, then a value of 350 is used as a default for this parameter.
- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR , LinkOverGroovoidNameSTR , LinkOutGroovoidNameSTR )
When there is also no LinkHoverGroovoidNameSTR parameter specified, then link hover events will not be sonified.
- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR , LinkOverGroovoidNameSTR )
When there is also no LinkOutGroovoidNameSTR parameter specified, then link onMouseOut events will not be sonified.
- Music.sonifyLinksWithGroovoids ( TargetMusicObjectOBJ , LinkClickGroovoidNameSTR )
When there is also no LinkOverGroovoidNameSTR parameter specified, then link onMouseOver events will not be sonified.

The Music.sonifyLinksWithHandlers static method lets you easily sonify all (or a subset) of the links on an HTML page using handlers.
The various parameters of this method (described in further detail below) let you choose which handlers are to be executed for the various link events, and also which links are to be sonified. Using the StartLinkLabelSTR, EndLinkLabelSTR, and LinkLabelPrefixSTR parameters, it is possible to identify exact groups of links that are to be sonified using this method. The method can be used several times to sonify different groups of links in different ways.

- LinkClickJavaScriptSTR - lets you specify the JavaScript code that is to be executed when a click event occurs for any of the sonified links
- LinkOverJavaScriptSTR - lets you specify the JavaScript code that is to be executed when an onMouseOver event occurs for any of the sonified links
- LinkOutJavaScriptSTR - lets you specify the JavaScript code that is to be executed when an onMouseOut event occurs for any of the sonified links
- LinkHoverJavaScriptSTR - lets you specify the JavaScript code that is to be executed when a "hover" event occurs for any of the sonified links
- LinkHoverDelayMsINT - lets you specify how long (measured in milliseconds) the user should remain over a link before a hover event is triggered for that link
- StartLinkLabelSTR - lets you specify the first link in the group of links that is to be sonified. For information on labeling links, see the Music.addLinkLabel method.
- EndLinkLabelSTR - lets you specify the last link in the group of links that is to be sonified. For information on labeling links, see the Music.addLinkLabel method.
- LinkLabelPrefixSTR - lets you specify a label prefix that is used to select only certain links out of the group of links specified by the StartLinkLabelSTR and EndLinkLabelSTR parameters. For information on labeling links, see the Music.addLinkLabel method.
- UpdateTypeSTR - lets you specify the way in which the new sonification scheme should affect any sonification scheme that is already set up for the links that will be sonified by this method. There are four possible values for this parameter...
- "add to" - means that the effect of this method will be cumulative, so that the sonification scheme specified by this method will be added to any existing sonification scheme.
- "replace" - means that the sonification scheme specified by this method will completely replace any sonification scheme already set up for the links. If there are events in the new sonification scheme that do not have any JavaScript code specified, then the previous sonification behavior for these events of the links will be erased. It is possible to use this method to completely erase the sonification of a set of links, simply by specifying empty strings for all the JavaScriptSTR-type parameters, and by also specifying the "replace" value for the UpdateTypeSTR parameter.
- "merge with" - means that the sonification scheme specified by this method will replace the existing sonification scheme set up for the links, but only for those events for which JavaScript code is specified. As an example, if this method were used with the value "merge with" specified for the UpdateTypeSTR parameter, and if there was JavaScript code specified for only the LinkOverJavaScriptSTR parameter, then this method would overwrite the sonification behavior for the onMouseOver events of all the links but would not overwrite the sonification behaviors for any of the other link events. So, unlike the "replace" value, the "merge with" value will not allow you to use this method to completely erase the sonification scheme for a set of links.
- "fill in" - means that the sonification scheme specified by this method will fill in the "holes" in the existing sonification scheme set up for links. For example, if this method were used with the value "fill in" specified for the UpdateTypeSTR parameter, and if there was JavaScript code specified for the LinkOverJavaScriptSTR parameter, then this method will add the specified JavaScript code to the onMouseOver events for all of the links that don't already have a sonification behavior set up for the onMouseOver event.
- WindowHandleOBJ - lets you specify the window or frame that contains the links you would like to sonify. This allows you to use this method to sonify links that are in a different window or frame than the window or frame that contains the music and resources and sonification code. As an example, a window that is sonified and has sourced in the "music-object.js" and "music-object-x-wizards.js" files can spawn a new window and sonify the links in that window using the Music.sonifyLinksWithGroovoids method, simply by using the WindowHandleOBJ parameter to specify a reference to the spawned window that is to be sonified.
Sonification of links using this method is cumulative by default (unless you specify a value for the UpdateTypeSTR parameter), so you can use the method multiple times to add further sonification. In the following example, all the links inside a document are being sonified so that their click events play the percussion instrument "Ice Cube" (bank 1, program 198), whereas only the subset of links from the link labeled "start chunky links" to the link labeled "end chunky links" are sonified so that their onMouseOver events also play the percussion instrument "Tablaesque - Low" (bank 1, program 174).
<HTML><HEAD><TITLE>Link Sonification Example</TITLE></HEAD>
<BODY ONLOAD="sonifyLinks ()">
<SCRIPT SRC="music-object.js></SCRIPT>
<SCRIPT SRC="music-object-x-wizards.js></SCRIPT>
<A HREF="link01.html">Link 01</A>
<A HREF="link02.html">Link 02</A>
<A HREF="link03.html">Link 03</A>
<A HREF="link04.html">Link 04</A>
<A HREF="link05.html" ONCLICK="Music.addLinkLabel ('start chunky links')">Link 05</A>
<A HREF="link06.html">Link 06</A>
<A HREF="link07.html">Link 07</A>
<A HREF="link08.html">Link 08</A>
<A HREF="link09.html">Link 09</A>
<A HREF="link10.html">Link 10</A>
<A HREF="link11.html" ONCLICK="Music.addLinkLabel ('end chunky links')">Link 11</A>
<A HREF="link12.html">Link 12</A>
<A HREF="link13.html">Link 13</A>
<A HREF="link14.html">Link 14</A>
<SCRIPT LANGUAGE=JavaScript><!-- //
notePlayer = new Music ();
function sonifyLinks () {
Music.sonifyLinksWithHandlers (
'notePlayer.playNote (1,1,198,73,127,1000)'
);
Music.sonifyLinksWithGroovoids (
'',
'notePlayer.playNote (1,1,174,73,127,1000)',
'',
'',
null,
'start chunky links',
'end chunky links'
);
}
notePlayer.stubEmbed ('stub.rmf');
// --></SCRIPT>
</BODY></HTML>
|

- When a value of null is specified for the LinkHoverDelayMsINT parameter, then the value 350 will be used as the default.
- When a value of null, an empty string, or the string value "[first link]" is specified for the StartLinkLabelSTR parameter, then the first link in the document will be used as the start of the link group to be sonified.
- When a value of null, an empty string, or the string value "[last link]" is specified for the EndLinkLabelSTR parameter, then the last link in the document will be used as the end of the link group to be sonified.
- When a value of null or an empty string is specified for the LinkLabelPrefixSTR parameter, then all of the links in the group specified by the StartLinkLabelSTR and EndLinkLabelSTR parameters will be sonified.
- When a value of null is specified for the UpdateTypeSTR parameter, then "add to" will be used as the default update type.

- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR , LinkOverJavaScriptSTR , LinkOutJavaScriptSTR , LinkHoverJavaScriptSTR , LinkHoverDelayMsINT , StartLinkLabelSTR , EndLinkLabelSTR , UpdateTypeSTR )
When no WindowHandleOBJ parameter is specified, then the links inside the window in which this method is called will be sonified. This is the most common way in which links will be sonified using this method (ie. just the links inside the document in which the sonification code resides).
- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR , LinkOverJavaScriptSTR , LinkOutJavaScriptSTR , LinkHoverJavaScriptSTR , LinkHoverDelayMsINT , StartLinkLabelSTR , EndLinkLabelSTR )
When there is also no UpdateTypeSTR parameter specified, then the string value "add to" will be used as the default for this parameter. In the most typical use of this method, it will not be necessary to specify the UpdateTypeSTR parameter.
- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR , LinkOverJavaScriptSTR , LinkOutJavaScriptSTR , LinkHoverJavaScriptSTR , LinkHoverDelayMsINT , StartLinkLabelSTR , EndLinkLabelSTR )
When there is also no LinkLabelPrefixSTR parameter specified, then all links in the group of links specified by the StartLinkLabelSTR and EndLinkLabelSTR parameters will be sonified.
- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR , LinkOverJavaScriptSTR , LinkOutJavaScriptSTR , LinkHoverJavaScriptSTR , LinkHoverDelayMsINT , StartLinkLabelSTR )
When there is also no EndLinkLabelSTR parameter specified, then all links in the document starting from the link specified by the StartLinkLabelSTR parameter will be sonified.
- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR , LinkOverJavaScriptSTR , LinkOutJavaScriptSTR , LinkHoverJavaScriptSTR , LinkHoverDelayMsINT )
When there is also no StartLinkLabelSTR parameter specified, then all links in the document will be sonified.
- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR , LinkOverJavaScriptSTR , LinkOutJavaScriptSTR , LinkHoverJavaScriptSTR )
When there is also no LinkHoverDelayMsINT parameter specified, then a value of 350 is used as a default for this parameter.
- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR , LinkOverJavaScriptSTR , LinkOutJavaScriptSTR )
When there is also no LinkHoverJavaScriptSTR parameter specified, then link hover events will not be sonified.
- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR , LinkOverJavaScriptSTR )
When there is also no LinkOutJavaScriptSTR parameter specified, then link onMouseOut events will not be sonified.
- Music.sonifyLinksWithHandlers ( LinkClickJavaScriptSTR )
When there is also no LinkOverJavaScriptSTR parameter specified, then link onMouseOver events will not be sonified.

The Music.noManualHandlers static property is a boolean variable, indicating if the HTML elements that are to be automatically sonified have no manually coded event handlers.
The default value of this property is false, and the property should only be set to true if it is known for certain that none of the HTML elements that may be automatically sonified by methods of the Wizards extension have pre-existing event handlers in the HTML code.
A Bug in Netscape 6
The Music.noManualHandlers property was introduced at around the time that Netscape 6 was released. With the initial release of Netscape 6, it was discovered that this browser had a significant issue that could cause the automatic sonification of HTML elements (using the Wizards extension) to interfere with other aspects of the proper functioning of HTML pages. For a detailed explanation of this issue, consult the section Authoring Issues: Netscape 6 and Automatic Sonification.
The value of this property will be used to determine whether or not event handlers can be automatically attached to HTML elements in order to sonify them, if the user is browsing with Netscape 6. The property's value is considered at the time that any of the Music.sonifyFormsWithGroovoids, Music.sonifyFormsWithHandlers, Music.sonifyLinksWithGroovoids, or Music.sonifyLinksWithHandlers static methods are called. If the property is set to false at the time that any of these methods is called and the user is browsing with Netscape 6, then these methods will have no effect.

- This property only affects the behavior of the Wizards extension when the user is browsing with Netscape 6. For all other browsers, this property has no effect.